<%--
  Created by IntelliJ IDEA.
  User: shanpengfei
  Date: 2019/3/3
  Time: 10:36 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>注册</title>
    <style>
        .user-content-bg {
            box-sizing: border-box;
            padding: 100px 0;
            width: 100%;
            height: 100%;
            background: url("/gyp/images/bg.jpg") center;
            background-repeat: no-repeat;
            background-size: cover;
        }
        .user-content-bg .user-content {
            margin: 0 auto;
            padding: 30px 46px;
            width: 300px;
            background: rgb(140, 160, 190);
        }

        .user-content-bg .user-content .register-form input, .user-content-bg .user-content .register-form select {
            margin: 5px 0;
            width: 300px;
            height: 40px;
        }
        .user-content-bg .user-content .register-form input[type="submit"] {
            width: 60px;
            height: 30px;
            border-radius: 5px;
            border: 1px solid rgb(66, 145, 240);
            background: rgb(66, 145, 240);
            color: #fff;
        }
    </style>
</head>
<body>
<div class="user-content-bg">
    <div class="user-content">
        <div class="register-form">
            <form action="/gyp/user/register" method="post">
                <input type="hidden" name="id" value="${user.id}"><br>
                <input type="text" name="username" value="${user.username}" placeholder="用户名"><br>
                <c:if test="${user.id == null}">
                    <input type="password" name="password" value="${user.password}" placeholder="密码"><br>
                    <%--<div id="container">--%>
                    <%--<a class="btn btn-default btn-lg " id="pickfiles" href="#" >--%>
                    <%--<span>上传志愿者图片，请选择文件</span>--%>
                    <%--</a>--%>
                    <%--</div>--%>
                    <%--<input id="urlText" name="pic" type="hidden" value=""></input>--%>
                </c:if>
                <input type="text" name="name" value="${user.name}" placeholder="姓名"><br>
                <%--<input type="number" name="sex" value="${user.sex}" min="1" max="2" placeholder="性别，1：男，2：女"><br>--%>
                <select name="sex" class="i2s-num">
                    <c:if test="${user.sex==1}">
                        <option value="1" selected>男</option>
                        <option value="2">女</option>
                    </c:if>
                    <c:if test="${user.sex==2}">
                        <option value="1">男</option>
                        <option value="2" selected>女</option>
                    </c:if>
                    <c:if test="${user.sex==null}">
                        <option value="1">男</option>
                        <option value="2">女</option>
                    </c:if>
                </select>
                <input type="text" name="birthday" value="${user.birthday}" placeholder="出生日期"><br>
                <input type="phone" name="phone" value="${user.phone}" placeholder="联系电话"><br>
                <input type="email" name="email" value="${user.email}" placeholder="邮箱"><br>
                <input type="text" name="address" value="${user.address}" placeholder="家庭地址"><br>

                <c:if test="${user.id==null}">
                    <input type="submit" value="注册">
                </c:if>
                <c:if test="${user.id!=null}">
                    <input type="submit" value="修改">
                </c:if>
            </form>
        </div>

        <c:if test="${status==1}">用户名已存在</c:if>
        <c:if test="${status==2}">保存失败</c:if>
        <c:if test="${status==3}">用户名为空</c:if>
    </div>
</div>
<script src="${basePath}/js/qiniu.js"></script>
</body>
</html>
